package cn.sdormitory.canteen.dao;

import cn.sdormitory.canteen.vo.FoodGoodsCheckVO;
import cn.sdormitory.canteen.vo.FoodOrderGoodsVO;
import cn.sdormitory.canteen.vo.FoodOrderVO;
import cn.sdormitory.canteen.vo.FoodSupplierVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface FoodOrderDao  extends BaseMapper<FoodOrderVO> {
    /**
     *查询订单列表
     * @return
     */
    List<FoodOrderVO> getOrderList(@Param("vo") FoodOrderVO vo);

    /**
     * 查询订单商品
     * @param orderNo
     * @return
     */
    List<FoodOrderGoodsVO> getOrderGoodsList(@Param("orderNo")String orderNo);

    /**
     * 查询商品验收信息
     * @param orderNo
     * @return
     */
    List<FoodGoodsCheckVO> getOrderGoodsCheckList(@Param("orderNo")String orderNo);


    /**
     *查询订单列表(分页)
     * @return
     */
    List<FoodOrderVO> getOrderPageList(@Param("vo") FoodOrderVO vo,@Param("currPage")int currPage, @Param("pageSize") int pageSize);
    int getOrderPageListCount(@Param("vo") FoodOrderVO vo);

    /**
     * 查询昨天到期的需要收货的订单
     * @return
     */
    List<FoodOrderVO> getExpiredOrderByYesterday();

    /**
     * 查询排名前10的商品
     * @return
     */
    List<FoodOrderGoodsVO> getOrderGoodsTop10();

    /**
     * 根据日期查询每天的核验通过信息
     * @param dateList
     * @return
     */
    List<Map<String,Object>> getWeekCheckPass(List<String> dateList);

    /**
     * 查询供应商发送商品的验收情况
     * @param limit
     * @return
     */
    List<Map<String,Object>> getSpplierCheckPass(@Param("limit") Integer limit);

    List<FoodSupplierVO> getSupplierInfoList();
}
